package com.lottery.material.dao.article;

import com.lottery.material.pojo.article.CompetitionInfo;
import com.lottery.material.pojo.page.PageData;
import com.lottery.material.vo.portal.competition.CompetitionArticleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @description 赛事信息Mapper
 * @author rambo
 * @date 2019年4月11日 下午9:22:46
 */
@SuppressWarnings("JavaDoc")
public interface CompetitionInfoMapper {
	
    Integer deleteByPrimaryKey(Integer id);

    Integer insert(CompetitionInfo record);

    Integer insertSelective(CompetitionInfo record);

    CompetitionInfo selectByPrimaryKey(Integer id);

    Integer updateByPrimaryKeySelective(CompetitionInfo record);

    Integer updateByPrimaryKey(CompetitionInfo record);

    /**
     * @Author: houjie
     * @Description: 根据赛事类型及赛事状态获取赛事列表
     * @Date: 2019/4/10 14:37
     */
    List<CompetitionInfo> findAllByCompetitionTypeAndStatePage(@Param("params") Map<String,Object> paramMap);

    /**
     * @Author: houjie
     * @Description: 根据赛事编号查询比赛
     * @Date: 2019/4/10 16:03
     */
    CompetitionInfo findByCompetitionTypeAndOpenId(PageData pd);

    List<CompetitionArticleVo> findCompetitionArticleVoByArticleId(Integer articleId);
}
